import Main from '@/view/main'
import parentView from '@/components/parent-view'

/**
 * iview-admin中meta除了原生参数外可配置的参数:
 * meta: {
 *  hideInMenu: (false) 设为true后在左侧菜单不会显示该页面选项
 *  notCache: (false) 设为true后页面不会缓存
 *  access: (null) 可访问该页面的权限数组，当前路由设置的权限会影响子路由
 *  icon: (-) 该页面在左侧菜单、面包屑和标签导航处显示的图标，如果是自定义图标，需要在图标名称前加下划线'_'
 * }
 */

export default [
  {
    path: '/login',
    name: 'login',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/login/login.vue')
  },
  {
    path: '/registered',
    name: 'registered',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/login/registered.vue')
  },
  {
    path: '/resetPwd',
    name: 'resetPwd',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/login/resetPwd.vue')
  },
  {
    path: '/',
    name: '_home',
    redirect: '/home',
    component: Main,
    meta: {
      hideInMenu: true,
      notCache: true
    },
    children: [
      {
        path: '/home',
        name: 'home',
        meta: {
          hideInMenu: true,
          title: '首页',
          notCache: true
        },
        component: () => import('@/view/home/home.vue')
      },
      {
        path: '/ownspace_index',
        name: 'ownspace_index',
        meta: {
          hideInMenu: true,
          title: '个人中心',
          notCache: true
        },
        component: () => import('@/view/own-space/own-space.vue')
      },
      {
        path: '/localMessage_index',
        name: 'localMessage_index',
        meta: {
          hideInMenu: true,
          title: '消息中心',
          notCache: true
        },
        component: () => import('@/view/localMessage/index.vue')
      },
      {
        path: 'collection',
        name: 'collection',
        meta: {
          title: '我的收藏',
          hideInMenu: true,
          notCache: true
        },
        component: () => import('@/view/collection/table.vue')
      },
    ]
  },
  {
    path: '/addressBook',
    name: 'addressBook',
    meta: {
      icon: 'md-menu',
      title: '智能沟通'
    },
    component: Main,
    children: [
      {
        path: 'chats_index',
        name: 'chats_index',
        meta: {
          icon: 'ios-chatbubbles',
          title: '消息'
        },
        component: () => import('@/view/chat/index.vue')
      },
      {
        path: 'addressBookManagement',
        name: 'addressBookManagement',
        meta: {
          icon: 'md-menu',
          showAlways: true,
          title: '通讯录'
        },
        component: parentView,
        children: [
          {
            path: 'my_group_index',
            name: 'my_group_index',
            meta: {
              icon: 'md-chatboxes',
              title: '群组'
            },
            component: () => import('@/view/addressBook/my_group_index.vue')
          },
          {
            path: 'addressBook_index',
            name: 'addressBook_index',
            meta: {
              icon: 'ios-people',
              title: '组织机构'
            },
            component: () => import('@/view/addressBook/index.vue')
          },
        ]
      },
      {
        path: 'affiche_index',
        name: 'affiche_index',
        meta: {
          icon: 'md-megaphone',
          title: '公告'
        },
        component: () => import('@/view/affiche/table.vue')
      },
    ]
  },
  {
    path: '/works',
    name: 'works',
    meta: {
      icon: 'md-menu',
      title: '智慧办公'
    },
    component: Main,
    children: [
      {
        path: 'approval_index',
        name: 'approval_index',
        meta: {
          icon: 'ios-browsers',
          title: '审批'
        },
        component: () => import('@/view/approval/table.vue')
      },
      {
        path: 'task_index',
        name: 'task_index',
        meta: {
          icon: 'ios-bookmark',
          title: '任务'
        },
        component: () => import('@/view/task/table.vue')
      },
      {
        path: 'clock_today',
        name: 'clock_today',
        meta: {
          icon: 'md-apps',
          title: '签到'
        },
        component: () => import('@/view/clock/clock_today.vue')
      },
      {
        path: 'logs_index',
        name: 'logs_index',
        meta: {
          icon: 'ios-clipboard',
          title: '日志'
        },
        component: () => import('@/view/logs/table.vue')
      },
      {
        path: 'schedule_index',
        name: 'schedule_index',
        meta: {
          icon: 'ios-alarm',
          title: '日程'
        },
        component: () => import('@/view/schedule/table.vue')
      },
      {
        path: 'knowledge_index',
        name: 'knowledge_index',
        meta: {
          icon: 'ios-book',
          title: '知识库'
        },
        component: () => import('@/view/knowledge/table.vue')
      },
      {
        path: 'meeting',
        name: 'meeting',
        meta: {
          icon: 'md-contacts',
          title: '会议室申请'
        },
        component: () => import('@/view/meeting/table.vue')
      },
      {
        path: 'meeting_room',
        name: 'meeting_room',
        meta: {
          icon: 'md-cube',
          title: '会议室管理'
        },
        component: () => import('@/view/meeting_room/table.vue')
      },
      {
        path: 'userManagement',
        name: 'userManagement',
        meta: {
          icon: 'md-menu',
          showAlways: true,
          title: '人事管理'
        },
        component: parentView,
        children: [
          {
            path: 'user_list',
            name: 'user_list',
            meta: {
              icon: 'ios-people',
              title: '组织机构'
            },
            component: () => import('@/view/user/user_list.vue')
          },
          {
            path: 'user_retired',
            name: 'user_retired',
            meta: {
              icon: 'md-person',
              title: '离退休管理'
            },
            component: () => import('@/view/user/user_retired.vue')
          },
          {
            path: 'user_checkIn',
            name: 'user_checkIn',
            meta: {
              icon: 'md-list',
              title: '考勤管理'
            },
            component: () => import('@/view/user/user_checkIn.vue')
          },
          {
            path: 'vacation',
            name: 'vacation',
            meta: {
              icon: 'md-list',
              title: '请假'
            },
            component: () => import('@/view/vacation/table.vue')
          },
        ]
      }
    ]
  },
  {
    path: '/collaboration',
    name: 'collaboration',
    meta: {
      icon: 'md-menu',
      title: '智慧街道'
    },
    component: Main,
    children: [
      {
        path: 'workStyle_index',
        name: 'workStyle_index',
        meta: {
          icon: 'ios-leaf',
          title: '工作风采'
        },
        component: () => import('@/view/workStyle/table.vue')
      },
      {
        path: 'socialRepoManagement',
        name: 'socialRepoManagement',
        meta: {
          icon: 'md-menu',
          showAlways: true,
          title: '社会智库'
        },
        component: parentView,
        children: [
          {
            path: 'socialRepo_index',
            name: 'socialRepo_index',
            meta: {
              icon: 'ios-create',
              title: '社会智库'
            },
            component: () => import('@/view/socialRepo/table.vue')
          },
          {
            path: 'community_index',
            name: 'community_index',
            meta: {
              icon: 'ios-photos',
              title: '社区管理'
            },
            component: () => import('@/view/convenient_resident/community_index/community_list.vue')
          },
          {
            path: 'community_statistics',
            name: 'community_statistics',
            meta: {
              icon: 'ios-pulse',
              title: '社区统计'
            },
            component: () => import('@/view/convenient_resident/community_statistics/statistics.vue')
          },
        ]
      },
      {
        path: 'record_index',
        name: 'record_index',
        meta: {
          icon: 'logo-buffer',
          title: '经济档案'
        },
        component: () => import('@/view/record/table.vue')
      },
      {
        path: 'city_index',
        name: 'city_index',
        meta: {
          icon: 'md-list-box',
          title: '城市管理'
        },
        component: () => import('@/view/city/table.vue')
      },
      {
        path: 'unsafe_punish_index',
        name: 'unsafe_punish_index',
        meta: {
          icon: 'ios-navigate',
          title: '安全整治'
        },
        component: () => import('@/view/unsafe_punish/table.vue')
      },
      {
        path: 'assetsManagement',
        name: 'assetsManagement',
        meta: {
          icon: 'md-menu',
          showAlways: true,
          title: '资产管理'
        },
        component: parentView,
        children: [
          {
            path: 'my_assets',
            name: 'my_assets',
            meta: {
              icon: 'md-navigate',
              title: '我的资产'
            },
            component: () => import('@/view/assets/my_assets.vue')
          },
          {
            path: 'my_repair',
            name: 'my_repair',
            meta: {
              icon: 'md-hammer',
              title: '我的报修'
            },
            component: () => import('@/view/assets/my_repair.vue')
          },
        ]
      },
      {
        path: 'assets_index',
        name: 'assets_index',
        meta: {
          icon: 'ios-exit',
          title: '组织资产管理'
        },
        component: () => import('@/view/assets/assets_index.vue')
      },
      {
        path: 'contract_index',
        name: 'contract_index',
        meta: {
          icon: 'ios-paper',
          title: '合同管理'
        },
        component: () => import('@/view/contract/table.vue')
      },
      {
        path: 'ratepaying_index',
        name: 'ratepaying_index',
        meta: {
          icon: 'ios-share',
          title: '企业纳税'
        },
        component: () => import('@/view/ratepaying/table.vue')
      },
      {
        path: 'wechat_list',
        name: 'wechat_list',
        meta: {
          icon: 'md-flag',
          title: '微心愿'
        },
        component: () => import('@/view/wechat/wechat_wish.vue')
      },
      {
        path: 'communityManagement',
        name: 'communityManagement',
        meta: {
          icon: 'md-menu',
          showAlways: true,
          title: '便民服务'
        },
        component: parentView,
        children: [
          {
            path: 'community_announcement_index',
            name: 'community_announcement_index',
            meta: {
              icon: 'md-megaphone',
              title: '社区公告'
            },
            component: () => import('@/view/convenient_resident/community_announcement/table.vue')
          },

          {
            path: 'hotline_service_index',
            name: 'hotline_service_index',
            meta: {
              icon: 'ios-call',
              title: '热线电话'
            },
            component: () => import('@/view/hotline_service/table.vue')
          },
        ]
      },
    ]
  },
  {
    path: '/service',
    name: 'service',
    meta: {
      icon: 'md-menu',
      title: '智慧平台'
    },
    component: Main,
    children: [
      {
        path: 'dashboard_setup',
        name: 'dashboard_setup',
        meta: {
          icon: 'md-speedometer',
          title: '仪表盘'
        },
        component: () => import('@/view/set_up/dashboard_setup.vue')
      },
      {
        path: 'roles_index',
        name: 'roles_index',
        meta: {
          icon: 'md-card',
          title: '权限管理'
        },
        component: () => import('@/view/roles/table.vue')
      },
      {
        path: 'feedback_index',
        name: 'feedback_index',
        meta: {
          icon: 'md-flag',
          title: '意见反馈'
        },
        component: () => import('@/view/feedback/table.vue')
      },
      {
        path: 'access_time',
        name: 'access_time',
        meta: {
          icon: 'md-trending-up',
          title: '平台统计'
        },
        component: () => import('@/view/access_time/table.vue')
      },
      {
        path: 'Timing_task_setup',
        name: 'Timing_task_setup',
        meta: {
          icon: 'md-git-compare',
          title: '自动化管理'
        },
        component: () => import('@/view/set_up/Timing_task_setup.vue')
      },
      {
        path: 'version_index',
        name: 'version_index',
        meta: {
          icon: 'md-bookmarks',
          title: '版本管理'
        },
        component: () => import('@/view/version/table.vue')
      },
    ]
  },

  /*  {
   path: '/multilevel',
   name: 'multilevel',
   meta: {
   icon: 'md-menu',
   title: '多级菜单'
   },
   component: Main,
   children: [
   {
   path: 'level_2_1',
   name: 'level_2_1',
   meta: {
   icon: 'md-funnel',
   title: '二级-1'
   },
   component: () => import('@/view/multilevel/level-2-1.vue')
   },
   {
   path: 'level_2_2',
   name: 'level_2_2',
   meta: {
   //access: ['super_admin'],
   icon: 'md-funnel',
   showAlways: true,
   title: '二级-2'
   },
   component: parentView,
   children: [
   {
   path: 'level_2_2_1',
   name: 'level_2_2_1',
   meta: {
   icon: 'md-funnel',
   title: '三级'
   },
   component: () => import('@/view/multilevel/level-2-2/level-3-1.vue')
   },
   ]
   },
   {
   path: 'level_2_3',
   name: 'level_2_3',
   meta: {
   icon: 'md-funnel',
   title: '二级-3'
   },
   component: () => import('@/view/multilevel/level-2-3.vue')
   },
   ]
   },*/
  /*{
   path: '',
   name: 'doc',
   meta: {
   title: '文档',
   href: 'https://lison16.github.io/iview-admin-doc/#/',
   icon: 'ios-book'
   }
   },
   {
   path: '/join',
   name: 'join',
   component: Main,
   children: [
   {
   path: 'join_page',
   name: 'join_page',
   meta: {
   icon: '_qq',
   title: 'QQ群'
   },
   component: () => import('@/view/join-page.vue')
   }
   ]
   },
   {
   path: '/components',
   name: 'components',
   meta: {
   icon: 'logo-buffer',
   title: '组件'
   },
   component: Main,
   children: [
   {
   path: 'count_to_page',
   name: 'count_to_page',
   meta: {
   icon: 'md-trending-up',
   title: '数字渐变'
   },
   component: () => import('@/view/components/count-to/count-to.vue')
   },
   {
   path: 'drag_list_page',
   name: 'drag_list_page',
   meta: {
   icon: 'ios-infinite',
   title: '拖拽列表'
   },
   component: () => import('@/view/components/drag-list/drag-list.vue')
   },
   {
   path: 'tables_page',
   name: 'tables_page',
   meta: {
   icon: 'md-grid',
   title: '多功能表格'
   },
   component: () => import('@/view/components/tables/tables.vue')
   },
   {
   path: 'split_pane_page',
   name: 'split_pane_page',
   meta: {
   icon: 'md-pause',
   title: '分割窗口'
   },
   component: () => import('@/view/components/split-pane/split-pane.vue')
   },
   {
   path: 'markdown_page',
   name: 'markdown_page',
   meta: {
   icon: 'logo-markdown',
   title: 'Markdown编辑器'
   },
   component: () => import('@/view/components/markdown/markdown.vue')
   },
   {
   path: 'editor_page',
   name: 'editor_page',
   meta: {
   icon: 'ios-create',
   title: '富文本编辑器'
   },
   component: () => import('@/view/components/editor/editor.vue')
   },
   {
   path: 'icons_page',
   name: 'icons_page',
   meta: {
   icon: '_bear',
   title: '自定义图标'
   },
   component: () => import('@/view/components/icons/icons.vue')
   }
   ]
   },
   {
   path: '/update',
   name: 'update',
   meta: {
   icon: 'md-cloud-upload',
   title: '数据上传'
   },
   component: Main,
   children: [
   {
   path: 'update_table_page',
   name: 'update_table_page',
   meta: {
   icon: 'ios-document',
   title: '上传Csv'
   },
   component: () => import('@/view/update/update-table.vue')
   },
   {
   path: 'update_paste_page',
   name: 'update_paste_page',
   meta: {
   icon: 'md-clipboard',
   title: '粘贴表格数据'
   },
   component: () => import('@/view/update/update-paste.vue')
   }
   ]
   },
   {
   path: '/excel',
   name: 'excel',
   meta: {
   icon: 'ios-stats',
   title: 'EXCEL导入导出'
   },
   component: Main,
   children: [
   {
   path: 'upload-excel',
   name: 'upload-excel',
   meta: {
   icon: 'md-add',
   title: '导入EXCEL'
   },
   component: () => import('@/view/excel/upload-excel.vue')
   },
   {
   path: 'export-excel',
   name: 'export-excel',
   meta: {
   icon: 'md-download',
   title: '导出EXCEL'
   },
   component: () => import('@/view/excel/export-excel.vue')
   }
   ]
   },
   {
   path: '/tools_methods',
   name: 'tools_methods',
   meta: {
   hide: true
   },
   component: Main,
   children: [
   {
   path: 'tools_methods_page',
   name: 'tools_methods_page',
   meta: {
   icon: 'ios-hammer',
   title: '工具方法'
   },
   component: () => import('@/view/tools-methods/tools-methods.vue')
   }
   ]
   },
   {
   path: '/directive',
   name: 'directive',
   meta: {
   hide: true
   },
   component: Main,
   children: [
   {
   path: 'directive_page',
   name: 'directive_page',
   meta: {
   icon: 'ios-navigate',
   title: '指令'
   },
   component: () => import('@/view/directive/directive.vue')
   }
   ]
   },*/
  {
    path: '/argu',
    name: 'argu',
    meta: {
      hideInMenu: true
    },
    component: Main,
    children: [
      {
        path: 'params/:id',
        name: 'params',
        meta: {
          icon: 'md-flower',
          title: '动态路由',
          notCache: true
        },
        component: () => import('@/view/argu-page/params.vue')
      },
      {
        path: 'query',
        name: 'query',
        meta: {
          icon: 'md-flower',
          title: '带参路由',
          notCache: true
        },
        component: () => import('@/view/argu-page/query.vue')
      }
    ]
  },
  {
    path: '/401',
    name: 'error_401',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/401.vue')
  },
  {
    path: '/500',
    name: 'error_500',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/500.vue')
  },
  {
    path: '*',
    name: 'error_404',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/404.vue')
  }
]
